package com.example.springframeworklearning.controller;

import com.example.springframeworklearning.domain.OrderItem;
import org.springframework.core.convert.ConversionService;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author luo
 * @since 2022/9/21 11:53
 */
@RestController
@RequestMapping("/formatter")
public class FormatterController {


    @GetMapping("/detail")
    public OrderItem detail(){
        OrderItem orderItem = new OrderItem();
        orderItem.setName("请看我的日期");
        orderItem.setCreateTime(new Date());
        return orderItem;
    }
}
